package com.party.mem.web.dto.common;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * 会员详细信息类型枚举
 * @ClassName MemberDetailsType
 * @Description
 * @Author shenliuhai
 * @Date 2020/1/15 17:28
 **/
public enum  MemberDetailsType {

    个人信息(0, "个人信息"),
    行知公社信息(1, "行知公社信息"),
    一对一分析信息(2, "一对一分析信息");

    private Integer code;
    private String value;

    private MemberDetailsType(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static String getValue(Integer code) {
        MemberDetailsType[] enums = values();
        MemberDetailsType[] var2 = enums;
        int var3 = enums.length;

        for(int var4 = 0; var4 < var3; ++var4) {
            MemberDetailsType e = var2[var4];
            if (e.getCode().equals(code)) {
                return e.getValue();
            }
        }

        return null;
    }

    public static Map<Integer, String> convertMap() {
        Map<Integer, String> map = Maps.newHashMap();
        MemberDetailsType[] enums = values();
        MemberDetailsType[] var2 = enums;
        int var3 = enums.length;

        for(int var4 = 0; var4 < var3; ++var4) {
            MemberDetailsType e = var2[var4];
            map.put(e.getCode(), e.getValue());
        }

        return map;
    }
}
